
let base = '';
let API_NEW_VERSION = 'http://47.103.195.147:10010/api/v2.0/admin';
let newApi = 'http://47.103.195.147:8090';
// newApi = '';

//let requestLogin = params => { return axios.post(API_NEW_VERSION + '/login', params).then(res => res.data); };
let getUserList = params => { return axios.get(API_NEW_VERSION + '/user/list', { params: params }); };

let getUserListPage = params => { return axios.get(API_NEW_VERSION + '/user/listpage', { params: params }); };

let removeUser = params => { return axios.get(API_NEW_VERSION + '/user/remove', { params: params }); };

let batchRemoveUser = params => { return axios.get(API_NEW_VERSION + '/user/batchremove', { params: params }); };

let editUser = params => { return axios.get(API_NEW_VERSION + '/user/edit', { params: params }); };

let addUser = params => { return axios.get(API_NEW_VERSION + '/user/add', { params: params }); };



let requestLogin = params => { return axios.post(API_NEW_VERSION + '/login', params); };
let getDeviceListPage = params => { return axios.get(API_NEW_VERSION + '/device/page', { params: params }); };
let removeDevice = params => { return axios.delete(API_NEW_VERSION + '/device/del', { params: params }); };
let batchRemoveDevice = params => { return axios.get(API_NEW_VERSION + '/device/batchdel', { params: params }); };
let updateDevice = params => { return axios.put(API_NEW_VERSION + '/device/update', params); };
let addDevice = params => { return axios.post(API_NEW_VERSION + '/device/add', params); };
let getDeviceList = params => { return axios.get(newApi+'/renlian/v1/rest/device/', { params: params }); };
let apiGetBlacklistICCardPage = params => { return axios.get(API_NEW_VERSION + '/blacklisticcard/page', { params: params }); };
let apiBatchRemoveBlICCard = params => { return axios.get(API_NEW_VERSION + '/blacklisticcard/batchdel', { params: params }); };
let apiRemoveBlacklistICCard = params => { return axios.delete(API_NEW_VERSION + '/blacklisticcard/del', { params: params })};
let apiGetICCardList = params => { return axios.get(API_NEW_VERSION + '/iccard/listall', { params: params }); };
let apiBatchAddICCardToBlacklist = params => { return axios.post(API_NEW_VERSION + '/blacklisticcard/batchadd', params); };
let apiGetBlacklistFacePage = params => { return axios.get(API_NEW_VERSION + '/blacklistface/page', { params: params }); };
let apiBatchRemoveBlFace = params => { return axios.get(API_NEW_VERSION + '/blacklistface/batchdel', { params: params }); };
let apiRemoveBlacklistFace = params => { return axios.delete(API_NEW_VERSION + '/blacklistface/del', { params: params })};
let apiGetFaceList = params => { return axios.get(API_NEW_VERSION + '/face/listall', { params: params }); };
let apiBatchAddFaceToBlacklist = params => { return axios.post(API_NEW_VERSION + '/blacklistface/batchadd', params); };

let apiGetICCardPage = params => { return axios.get(API_NEW_VERSION + '/iccard/page', { params: params }); };
let apiRemoveICCard = params => { return axios.delete(API_NEW_VERSION + '/iccard/del', { params: params }); };
let apiBatchRemoveICCard = params => { return axios.get(API_NEW_VERSION + '/iccard/batchdel', { params: params }); };
let apiUpdateICCard = params => { return axios.put(API_NEW_VERSION + '/iccard/update', params); };
let apiAddICCard = params => { return axios.post(API_NEW_VERSION + '/iccard/add', params); };
let apiGetFacePage = params => { return axios.get(API_NEW_VERSION + '/face/page', { params: params }); };
let apiRemoveFace = params => { return axios.delete(API_NEW_VERSION + '/face/del', { params: params }); };
let apiBatchRemoveFace = params => { return axios.get(API_NEW_VERSION + '/face/batchdel', { params: params }); };
let apiUpdateFace = params => { return axios.put(API_NEW_VERSION + '/face/update', params); };
let apiAddFace = params => { return axios.post(API_NEW_VERSION + '/face/add', params); };

let apiGetUserList = params => { return axios.get(API_NEW_VERSION + '/users/listall', { params: params }); };
let apiGetUserPage = params => { return axios.get(API_NEW_VERSION + '/users/page', { params: params }); };
let apiRemoveUser = params => { return axios.delete(API_NEW_VERSION + '/users/del', { params: params }); };
let apiBatchRemoveUser = params => { return axios.get(API_NEW_VERSION + '/users/batchdel', { params: params }); };
let apiUpdateUser = params => { return axios.put(API_NEW_VERSION + '/users/update', params); };
let apiAddUser = params => { return axios.post(API_NEW_VERSION + '/users/add', params); };
let apiGenUserId = params => { return axios.get(API_NEW_VERSION + '/users/genuserid', { params: params }); };

let apiGetGateEventList = params => { return axios.get(API_NEW_VERSION + '/gateevent/listall', { params: params }); };
let apiGetGateEventPage = params => { return axios.get(newApi + '/renlian/v1/rest/gateevent/', { params: params }); };

let apiGetDevcfgByDevId = params => { return axios.get(API_NEW_VERSION + '/devcfg/getbydevid', { params: params }); };
let apiUpdateDevcfg = params => { return axios.put(API_NEW_VERSION + '/devcfg/update', params); };

let apiGetLongConnState = params => { return axios.get(API_NEW_VERSION + '/busi/long_conn_state', { params: params }); };
let apiGetPtuidList = params => { return axios.get(API_NEW_VERSION + '/busi/get_ptuid_list', { params: params }); };
let apiGetPtuidCandidateList = params => { return axios.get(API_NEW_VERSION + '/busi/get_ptuid_candidate_list', { params: params }); };
let apiAssignAppKey = params => { return axios.get(API_NEW_VERSION + '/busi/assign_key', { params: params }); };



let apiGetAccountList = params => { return axios.get(API_NEW_VERSION + '/account/listall', { params: params }); };
let apiGetAccountPage = params => { return axios.get(API_NEW_VERSION + '/account/page', { params: params }); };
let apiRemoveAccount = params => { return axios.delete(API_NEW_VERSION + '/account/del', { params: params }); };
let apiBatchRemoveAccount = params => { return axios.get(API_NEW_VERSION + '/account/batchdel', { params: params }); };
let apiUpdateAccount = params => { return axios.put(API_NEW_VERSION + '/account/update', params); };
let apiAddAccount = params => { return axios.post(API_NEW_VERSION + '/account/add', params); };
let apiAccountUpdatePasswd = params => { return axios.put(API_NEW_VERSION + '/account/updatepasswd', params); };

let apiGetAccountPtuidList = params => { return axios.get(API_NEW_VERSION + '/device_assign/listallbyaccountid', { params: params }); };
let apiGetAccountPtuidCandidateList = params => { return axios.get(API_NEW_VERSION + '/device_assign/get_ptuid_candidate_list', { params: params }); };
let apiDeviceAssignBatchDel = params => { return axios.get(API_NEW_VERSION + '/device_assign/batchdel', { params: params }); };
let apiDeviceAssignBatchAdd = params => { return axios.get(API_NEW_VERSION + '/device_assign/batchadd', { params: params }); };


let apiTestAesDecrypt = params => { return axios.get(API_NEW_VERSION + '/aes/decrypt', { params: params }); };
